//
//  SubjectNameHeadView.m
//  SafeFoodManagerDemo
//
//  Created by bob on 2017/11/10.
//  Copyright © 2017年 bob. All rights reserved.
//

#import "SubjectNameHeadView.h"

@interface SubjectNameHeadView()

@property(nonatomic,strong)UILabel *tiplabel;

@end

@implementation SubjectNameHeadView

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self=[super initWithFrame:frame]) {
        
        self.backgroundColor=TBColorWhite;
        
        self.tiplabel=[[UILabel alloc]initWithFrame:CGRectMake(10, 15, SCREEN_WIDTH-30, 40)];
        
        self.tiplabel.numberOfLines=2;
        
        self.tiplabel.textAlignment=NSTextAlignmentCenter;
        
        self.tiplabel.font=[UIFont systemFontOfSize:17];
        
        self.tiplabel.textColor=kColorRGB(0x222222);
        
        [self addSubview:self.tiplabel];
        
    }
    
    return self;
}

-(void)setSubjectName:(NSString *)SubjectName
{
    _SubjectName=SubjectName;
    
    self.tiplabel.text=SubjectName;

}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
